package com.vne.skyemart.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "Store",catalog = "skyemart_db")
public class Store implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 8973563676434504776L;

	@Id
	@GeneratedValue
	@Column(name = "StoreID",nullable = false)
	private int storeID;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "StatusID",nullable = false)
	private CategoriesStore categoriesStore;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "UserID",nullable = false)
	private ADUser adUser;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CompanyStoreID",nullable = false)
	private CompanyStore companyStore;
	
	@Column(name = "Name",nullable = false,length = 50)
	private String name;

	@Column(name = "Logo",nullable = false,length = 250)
	private String logo;

	@Column(name = "StoreCompanyName",nullable = false,length = 30)
	private String storeCompanyName;

	@Column(name = "StoreCompanyAddress",nullable = false,length = 50)
	private String storeCompanyAddress;

	@Column(name = "StoreCity",nullable = false,length = 20)
	private String storeCity;

	@Column(name = "StoreFone",nullable = false,length = 20)
	private String storeFone;

	@Column(name = "StoreFax",length = 20)
	private String storeFax;

	@Column(name = "StoreWebsite",length = 20)
	private String storeWebsite;

	@Column(name = "StoreType",nullable = false,length = 20)
	private String storeType;
	/**
	 * CONSTRUCTOR
	 * 
	 */
	public Store() {}
	
	public Store(int storeID, CategoriesStore categoriesStore, ADUser adUser,
			CompanyStore companyStore, String name, String logo,
			String storeCompanyName, String storeCompanyAddress,
			String storeCity, String storeFone, String storeFax,
			String storeWebsite, String storeType) {
		this.storeID = storeID;
		this.categoriesStore = categoriesStore;
		this.adUser = adUser;
		this.companyStore = companyStore;
		this.name = name;
		this.logo = logo;
		this.storeCompanyName = storeCompanyName;
		this.storeCompanyAddress = storeCompanyAddress;
		this.storeCity = storeCity;
		this.storeFone = storeFone;
		this.storeFax = storeFax;
		this.storeWebsite = storeWebsite;
		this.storeType = storeType;
	}

	/**
	 * GETTER AND SETTER
	 * 
	 */
	public int getStoreID() {
		return storeID;
	}
	public void setStoreID(int storeID) {
		this.storeID = storeID;
	}
	public CategoriesStore getCategoriesStore() {
		return categoriesStore;
	}
	public void setCategoriesStore(CategoriesStore categoriesStore) {
		this.categoriesStore = categoriesStore;
	}
	public ADUser getAdUser() {
		return adUser;
	}
	public void setAdUser(ADUser adUser) {
		this.adUser = adUser;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getLogo() {
		return logo;
	}
	public void setLogo(String logo) {
		this.logo = logo;
	}
	public String getStoreCompanyName() {
		return storeCompanyName;
	}
	public void setStoreCompanyName(String storeCompanyName) {
		this.storeCompanyName = storeCompanyName;
	}
	public String getStoreCompanyAddress() {
		return storeCompanyAddress;
	}
	public void setStoreCompanyAddress(String storeCompanyAddress) {
		this.storeCompanyAddress = storeCompanyAddress;
	}
	public String getStoreCity() {
		return storeCity;
	}
	public void setStoreCity(String storeCity) {
		this.storeCity = storeCity;
	}
	public String getStoreFone() {
		return storeFone;
	}
	public void setStoreFone(String storeFone) {
		this.storeFone = storeFone;
	}
	public String getStoreFax() {
		return storeFax;
	}
	public void setStoreFax(String storeFax) {
		this.storeFax = storeFax;
	}
	public String getStoreWebsite() {
		return storeWebsite;
	}
	public void setStoreWebsite(String storeWebsite) {
		this.storeWebsite = storeWebsite;
	}
	public String getStoreType() {
		return storeType;
	}
	public void setStoreType(String storeType) {
		this.storeType = storeType;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public CompanyStore getCompanyStore() {
		return companyStore;
	}

	public void setCompanyStore(CompanyStore companyStore) {
		this.companyStore = companyStore;
	}
}
